package router

import (
	"github.com/gin-gonic/gin"
	"mxshop_api/order-web/api/order"
	"mxshop_api/order-web/api/pay"
	"mxshop_api/user-web/middlewares"
)

func InitOrderRouter(group *gin.RouterGroup) {

	routerGroup := group.Group("/orders").Use(middlewares.JWTAuth())
	{
		routerGroup.GET("", order.List)
		routerGroup.GET("/:id", order.Detail)
		routerGroup.POST("", order.New)
	}
	routerGroup = group.Group("/pay")
	{
		routerGroup.GET("/alipay/notify", pay.Notify)
	}
}
